package com.wust.smartcity.demo.server.core.api.feign.client;


import com.wust.smartcity.common.dto.WebResponseDto;
import com.wust.smartcity.common.entity.sys.distributedfile.SysDistributedFile;
import com.wust.smartcity.demo.server.core.api.feign.client.impl.DistributedFileServiceFallbackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "admin-server",fallback = DistributedFileServiceFallbackImpl.class)
public interface DistributedFileService {
    @RequestMapping(value = "/api/feign/v1/DistributedFileFeignApi/insert",method= RequestMethod.POST, consumes = "application/json")
    WebResponseDto insert(@RequestHeader(name = "x-ctx", required = true) String ctx, @RequestBody SysDistributedFile entity);

    @RequestMapping(value = "/api/feign/v1/DistributedFileFeignApi/deleteByPrimaryKey",method= RequestMethod.POST, consumes = "application/json")
    WebResponseDto deleteByPrimaryKey(@RequestHeader(name = "x-ctx", required = true) String ctx, @RequestParam Long id);

    @RequestMapping(value = "/api/feign/v1/DistributedFileFeignApi/selectOne",method= RequestMethod.POST, consumes = "application/json")
    WebResponseDto selectOne(@RequestHeader(name = "x-ctx", required = true) String ctx, @RequestBody SysDistributedFile search);
}
